/**
 * @author liyi
 * @desc 解析工厂树形结构,找到当前树形节点的子集
 * @type {{getChildren: (function(*, *): Array)}}
 */
const tree = {
  getChildren: (list, id) => {
    let target = list.find((item) => item.id === id) || {children: []}
    return target.children
  }
}

export default tree
